/*AyflEomXWyqCHfdTxzWda+ZiNDhxOZJeZF/oshAh0uo=*/
/*
 * @Author: xiahui 
 * @PageInfo: 列表按钮区
 * @Date: 2019-01-10 17:07:19 
 * @Last Modified by: zhangmi
 * @Last Modified time: 2021-07-12 15:15:26
 */
import { BUTTONID, FIELDS, AREA } from '../../constance';
import manualBtnClick from './manualBtnClick';
import ref20BtnClick from './ref20BtnClick';
import deleteBtnClick from './deleteBtnClick';
import searchBtnClick from './searchBtnClick';
import pageInfoClick from './pageInfoClick';
import editBtnClick from './editBtnClick';
import refreshBtnClick from './refreshBtnClick';
import commitBtnClick from './commitBtnClick';
import unCommitBtnClick from './unCommitBtnClick';
import validateBtnClick from './validateBtnClick';
import unValidateBtnClick from './unValidateBtnClick';
import freezeBtnClick from './freezeBtnClick';
import unFreezeBtnClick from './unFreezeBtnClick';
import endBtnClick from './endBtnClick';
import unEndBtnClick from './unEndBtnClick';
import modifyBtnClick from './modifyBtnClick';
import modifyDeleteBtnClick from './modifyDeleteBtnClick';
import approveInfoBtnClick from './approveInfoBtnClick';
import queryAboutBusinessBtnClick from './queryAboutBusinessBtnClick';
import fileBtnClick from './fileBtnClick';
import outputBtnClick from './outputBtnClick';
import printBtnClick from './printBtnClick';
import copyBtnClick from './copyBtnClick';
import controlScopeBtnClick from './controlScopeBtnClick';
import batchControlScopeBtnClick from './batchControlScopeBtnClick';
import structFileBtnClick from './structFileBtnClick';
import payExecStateBtnClick from './payExecStateBtnClick';
import payPlanBtnClick from './payPlanBtnClick';
import modifyHistoryBtnClick from './modifyHistoryBtnClick';
import ref28BtnClick from './ref28BtnClick';
import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';

function buttonClick(props, id, text, record, index) {
	switch (id) {
		case BUTTONID.Manual:
			manualBtnClick.call(this, props);
			break;
		case BUTTONID.Ref20:
			ref20BtnClick.call(this, props);
			break;
		case BUTTONID.Ref28:
			ref28BtnClick.call(this, props);
			break;
		case BUTTONID.Edit:
			editBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.Delete:
			deleteBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.Copy:
			copyBtnClick.call(this, props, record, index);
			break;

		case BUTTONID.Commit:
			commitBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.UnCommit:
			unCommitBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.Validate:
			validateBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.UnValidate:
			unValidateBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.Freeze:
			freezeBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.UnFreeze:
			unFreezeBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.End:
			endBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.UnEnd:
			unEndBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.Modify:
			modifyBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.ModifyDelete:
			modifyDeleteBtnClick.call(this, props, record, index);
			break;

		case BUTTONID.ApproveInfo:
			approveInfoBtnClick.call(this, props, record, index);
			break;
		case BUTTONID.QueryAboutBusiness:
			queryAboutBusinessBtnClick.call(this, props);
			break;

		case BUTTONID.ControlScope:
			controlScopeBtnClick.call(this, props);
			break;
		case BUTTONID.BatchControlScope:
			batchControlScopeBtnClick.call(this, props);
			break;
		case BUTTONID.PayPlan:
			payPlanBtnClick.call(this, props);
			break;
		case BUTTONID.StructFile:
			structFileBtnClick.call(this, props);
			break;
		case BUTTONID.File:
			fileBtnClick.call(this, props);
			break;
		case BUTTONID.ModifyHistory:
			modifyHistoryBtnClick.call(this, props);
			break;
		case BUTTONID.PayExecState:
			payExecStateBtnClick.call(this, props);
			break;
		case BUTTONID.Print:
			printBtnClick.call(this, props);
			break;
		case BUTTONID.Output:
			outputBtnClick.call(this, props);
			break;

		case BUTTONID.Refresh:
			refreshBtnClick.call(this, props);
			break;
		case BUTTONID.PrintCountQuery: //打印次数查询
			let CONST = { hid: FIELDS.pk_ct_pu, area: AREA.listTableId };
			printCountQuery.call(this, props, { type: 1, CONST, modal: 'code-config' });
			break;
	}
}

export { buttonClick, searchBtnClick, pageInfoClick };

/*AyflEomXWyqCHfdTxzWda+ZiNDhxOZJeZF/oshAh0uo=*/